Get Last Character of String with JavaScript